import ajax from "./ajax";

export const reqTm = (page, pageSize) =>
  ajax({ url: `/admin/product/baseTrademark/${page}/${pageSize}`, method: "get" });

export const reqAddOrEdit = (tm) => {
  if (tm.id) {
    return ajax({
      url: "/admin/product/baseTrademark/update",
      method: "put",
      data: tm,
    });
  } else {
    return ajax({
      url: "/admin/product/baseTrademark/save",
      method: "post",
      data: tm,
    });
  }
};

export const reqDeleteTrade = (id) =>
  ajax({
    url: `/admin/product/baseTrademark/remove/${id}`,
    method: "delete",
  });
